﻿using System;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace Esponce.QRCode
{
	[DataContract(Name = "location", Namespace = "")]
	public partial class GeoLocationModel : INotifyPropertyChanged
	{
		#region Public properties
		[DataMember(Name = "latitude", IsRequired = false, EmitDefaultValue = false)]
		public decimal? Latitude
		{
			get
			{
				return this.latitude;
			}
			set
			{
				if (this.latitude != value)
				{
					this.latitude = value;
					OnPropertyChanged("Latitude");
				}
			}
		}
		private decimal? latitude;

		[DataMember(Name = "longitude", IsRequired = false, EmitDefaultValue = false)]
		public decimal? Longitude
		{
			get
			{
				return this.longitude;
			}
			set
			{
				if (this.longitude != value)
				{
					this.longitude = value;
					OnPropertyChanged("Longitude");
				}
			}
		}
		private decimal? longitude;

		[DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)]
		public string Address
		{
			get
			{
				return this.address;
			}
			set
			{
				if (this.address != value)
				{
					this.address = value;
					OnPropertyChanged("Address");
				}
			}
		}
		private string address;
		#endregion

		#region INotifyPropertyChanged Members
		public event PropertyChangedEventHandler PropertyChanged;
		protected virtual void OnPropertyChanged(string propertyName)
		{
			if (PropertyChanged != null)
			{
				PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
		#endregion
	}
}
